package com.david.http.http.method.test

import com.david.http.http.MyRetrofitHelper
import com.david.http.http.response.BaseResult
import kotlinx.coroutines.flow.Flow
import retrofit2.http.GET
import retrofit2.http.Query
val methodTestInterface:IMethodTest = MyRetrofitHelper.create(IMethodTest::class.java)

interface IMethodTest {
    @GET("/resources/json/test.json")
    fun test(): Flow<BaseResult<TestResultData>>

    @GET("/resources/json/books.json")
    fun getBooks(@Query("city") city: String?): Flow<String?>?
}

data class TestResultData(
    var name: String,
    var age: Int
)